/*
 * @Author: your name
 * @Description: 
 * @FilePath: /code/time/main.cc
 */
#include "timer_manager.h"
#include <iostream>
#include <functional>

#include <unistd.h>
using namespace std;
void TimeFunc()
{
    std::cout<< "Time On!" <<std::endl;
}
int main()
{
    std::function<void()> f = TimeFunc;
    TimerManager time_manager;
    time_manager.AddTimer(3,5,f);
    while(1) 
    {
        time_manager.CheckAndHandle();
        std::cout << "doing other things!" << std::endl;
        sleep(2);
    }
    return 0;
}